package com.hnqcgczy.supplier.db;

import com.mchange.v2.c3p0.ComboPooledDataSource;

import java.sql.SQLException;

/***
 * 使用C3p0连接
 */
public class MyConnC3P0 implements IConnection {
    //创建连接池对象
    //使用默认配置
    ComboPooledDataSource dataSource = new ComboPooledDataSource();

    @Override
    public java.sql.Connection getConnectionByMysql() throws SQLException {
        //返回连接对象
        return dataSource.getConnection();
    }
}
